#include "img_struct.h"

statistics_config_t imx122_tile_config = {
	1,
	1,

	24,
	16,
	128,
	48,
	160,
	250,
	160,
	250,
	0,
	16383,

	12,
	8,
	0,
	8,
	340,
	512,

	8,
	5,
	256,
	10,
	448,
	816,
	448,
	816,

	0,
	16383,
};

line_t imx122_50hz_lines[] = {
		{
		{{SHUTTER_1BY8000, ISO_100, 0}}, {{SHUTTER_1BY100, ISO_100,0}}
		},

		{
		{{SHUTTER_1BY100, ISO_100, 0}}, {{SHUTTER_1BY100, ISO_300, 0}}
		},

		{
		{{SHUTTER_1BY50, ISO_100, 0}}, {{SHUTTER_1BY50, ISO_800,0}}
		},

		{
		{{SHUTTER_1BY30, ISO_100, 0}}, {{SHUTTER_1BY30, ISO_12800,0}}
		}
};

line_t imx122_60hz_lines[] = {
		{
		{{SHUTTER_1BY8000, ISO_100, 0}}, {{SHUTTER_1BY120, ISO_100,0}}
		},

		{
		{{SHUTTER_1BY120, ISO_100, 0}}, {{SHUTTER_1BY120, ISO_300, 0}}
		},

		{
		{{SHUTTER_1BY60, ISO_100, 0}}, {{SHUTTER_1BY60, ISO_800,0}}
		},

		{
		{{SHUTTER_1BY30, ISO_100, 0}}, {{SHUTTER_1BY30, ISO_12800,0}}
		}
};

img_awb_param_t imx122_awb_param = {
	{
		{1880, 1024, 1900},	//AUTOMATIC
		{1100, 1024, 3400},	//INCANDESCENT
		{1300, 1024, 2900},	//D4000
		{1650, 1024, 2100},	//D5000
		{1880, 1024, 1900},	//SUNNY
		{2050, 1024, 1780},	//CLOUDY
		{1598, 1024, 1875},	//FLASH
		{1024, 1024, 1024},	//FLUORESCENT
		{1024, 1024, 1024},	//FLUORESCENT_H
		{1024, 1024, 1024},	//UNDER WATER
		{1024, 1024, 1024},	//CUSTOM
		{1598, 1024, 1875},	//AUTOMATIC OUTDOOR
	},
	{
		12,
		{{ 850, 1500, 2900, 3900, -2500, 5300, -2500, 6900, 1000, 1900, 1000,  2900, 1 },	// 0	INCANDESCENT
		 {  950, 1850, 2200, 3550, -2500, 5300, -2500, 7800, 1000,   950, 1000,  2000, 2 },	// 1    D4000
		 {1200, 2000, 1600, 2700, -2000, 4600, -2000, 6000, 1000,   200, 1000,  1000, 4 },	// 2	 D5000
		 {1400, 2300, 1400, 2400,   -800, 2900,   -800, 3750, 1000, -400, 1000,   350, 8 },	// 3    SUNNY
		 {1500, 2400, 1400, 2300,   -800, 2900,   -800, 3750, 1000, -850, 1000,     50, 4 },	// 4    CLOUDY
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },					// 5    ...
		 {1700, 2150, 2050, 3600, -1400, 4800, -1200, 5800, 1600,-1200, 3000, -2500, -1 },	// 6	GREEN REGION
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 7    FLASH
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 8	FLUORESCENT
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 9    FLUORESCENT_2
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 10	FLUORESCENT_3
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 }},
	},
	{	{ 0 ,6},	//LUT num. AUTOMATIC  INDOOR
		{ 0, 1},	//LUT num. INCANDESCENT
		{ 1, 1},	//LUT num. D4000
		{ 2, 1},	//LUT num. D5000
		{ 2, 5},	//LUT num. SUNNY
		{ 4, 3},	//LUT num. CLOUDY
		{ 7, 1},	//LUT num. FLASH
		{ 8, 1},	//LUT num. FLUORESCENT
		{ 9, 1},	//LUT num. FLUORESCENT_H
		{11, 1},	//LUT num. UNDER WATER
		{11, 1},	//LUT num. CUSTOM
		{ 0, 7},	//LUT num. AUTOMATIC  OUTDOOR
	 }
};

// copy from imx036
u32 imx122_ae_agc_dgain[AGC_DGAIN_TABLE_LENGTH]={
		1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	};

/*1080p 29.97 & 59.94 use the same table */
u32 imx122_ae_sht_dgain_1080p29_97[SHUTTER_DGAIN_TABLE_LENGTH]={
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,
	1024,1025,1020,1013,1016,1040,1033,1035,1028,1022,1024,1047,1041,1040,1031,1027,
	1024,1048,1044,1039,1031,1029,1024,1049,1049,1041,1031,1032,1024,1050,1050,1041,
	1032,1032,1024,1053,1053,1045,1038,1038,1029,1024,1059,1050,1046,1041,1032,1029,
	1024,1055,1054,1048,1039,1039,1032,1024,1064,1055,1044,1044,1034,1024,1024,1057,
	1051,1051,1042,1037,1036,1027,1024,1065,1056,1054,1049,1040,1040,1033,1024,1071,
	1062,1052,1052,1043,1034,1033,1024,1067,1065,1056,1053,1049,1040,1039,1032,1024,
	1075,1066,1057,1057,1049,1039,1040,1030,1024,1077,1068,1063,1059,1050,1047,1041,
	1032,1032,1024,1072,1073,1064,1054,1055,1045,1039,1035,1026,1024,1079,1070,1070,
	1062,1053,1053,1044,1037,1035,1026,1024,1083,1073,1074,1065,1057,1057,1048,1045,
	1040,1032,1032,1024,1084,1083,1073,1070,1064,1054,1054,1045,1037,1035,1025,1024,
	1091,1081,1082,1072,1067,1062,1053,1053,1044,1036,1034,1025,1024,1096,1088,1088,
	1078,1075,1069,1059,1060,1051,1045,1042,1033,1032,1024,1102,1102,1093,1091,1084,
	1074,1075,1066,1061,1058,1049,1049,1040,1033,1032,1024,1118,1109,1099,1100,1090,
	1086,1081,1071,1071,1062,1054,1052,1043,1041,1033,1024,1024,1118,1115,1109,1099,
	1100,1090,1083,1081,1071,1070,1061,1053,1052,1043,1039,1033,1024,1024,1131,1126,
	1122,1113,1114,1104,1096,1096,1086,1084,1078,1068,1069,1060,1054,1051,1041,1042,
	1033,1025,1024,1146,1144,1137,1127,1128,1118,1112,1109,1099,1099,1090,1081,1081,
	1071,1068,1062,1052,1053,1043,1036,1034,1025,1024,1167,1157,1158,1148,1143,1139,
	1129,1130,1121,1113,1112,1102,1100,1093,1083,1084,1074,1068,1065,1056,1055,1047,
	1038,1038,1028,1024,1197,1187,1188,1179,1170,1170,1160,1156,1151,1141,1141,1132,
	1124,1123,1113,1110,1105,1095,1095,1087,1078,1078,1069,1063,1060,1051,1050,1042,
	1032,1033,1024,1229,1229,1219,1216,1210,1203,1193,1194,1184,1176,1174,1165,1164,
	1156,1146,1147,1137,1131,1128,1118,1118,1109,1099,1100,1090,1084,1081,1071,1070,
	1062,1052,1052,1042,1038,1033,1024,1024,1287,1278,1278,1268,1264,1259,1249,1250,
	1239,1231,1231,1221,1217,1213,1202,1203,1193,1184,1184,1174,1170,1165,1155,1155,
	1145,1137,1136,1127,1123,1118,1108,1108,1099,1090,1090,1080,1076,1071,1061,1061,
	1052,1043,1042,1033,1028,1024,1386,1387,1377,1366,1369,1358,1353,1349,1338,1339,
	1330,1320,1321,1311,1305,1303,1292,1292,1283,1273,1275,1264,1257,1255,1245,1243,
	1237,1226,1228,1218,1209,1208,1198,1192,1190,1180,1178,1171,1161,1162,1153,1144,
	1144,1134,1128,1125,1116,1114,1106,1097,1098,1088,1079,1080,1070,1064,1061,1051,
	1049,1042,1032,1032,1024,1598,1599,1587,1582,1579,1568,1567,1559,1548,1550,1539,
	1530,1532,1519,1511,1511,1499,1497,1491,1479,1481,1471,1461,1463,1450,1441,1442,
	1431,1427,1422,1410,1411,1401,1390,1392,1381,1372,1372,1363,1356,1353,1342,1342,
	1333,1321,1323,1312,1304,1303,1293,1289,1283,1273,1274,1264,1255,1254,1244,1238,
	1234,1223,1223,1214,1204,1204,1194,1187,1185,1175,1174,1165,1154,1155,1145,1139,
	1135,1125,1124,1114,1105,1105,1095,1090,1085,1075,1074,1066,1055,1056,1045,1039,
	1035,1025,1024,2358,2332,2323,2295,2279,2260,2232,2228,2201,2175,2165,2138,2122,
	2102,2075,2068,2045,2018,2007,1981,1964,1945,1917,1910,1886,1861,1850,1823,1810,
	1789,1761,1753,1727,1706,1693,1666,1653,1631,1607,1595,1571,1548,1536,1509,1496,
	1472,1449,1437,1413,1394,1377,1350,1338,1316,1292,1279,1256,1236,1219,1195,1180,
	1159,1136,1124,1099,1080,1061,1039,1024,
};

/* 1080p 25 & 30 & 60 use the same table */
u32 imx122_ae_sht_dgain_1080p25[SHUTTER_DGAIN_TABLE_LENGTH]={
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,
	1024,1021,1018,1015,1012,1039,1036,1033,1030,1027,1024,1050,1045,1039,1034,1029,
	1024,1051,1046,1040,1035,1029,1024,1053,1047,1041,1036,1029,1024,1053,1047,1042,
	1035,1030,1024,1055,1050,1044,1039,1034,1029,1024,1056,1050,1045,1039,1034,1029,
	1024,1057,1052,1047,1041,1036,1030,1024,1059,1053,1048,1041,1035,1030,1024,1061,
	1056,1050,1045,1039,1034,1029,1024,1063,1057,1052,1046,1041,1035,1029,1024,1065,
	1059,1053,1047,1042,1036,1030,1024,1068,1062,1056,1051,1045,1040,1034,1029,1024,
	1069,1063,1058,1051,1046,1040,1034,1029,1024,1073,1067,1062,1056,1051,1046,1040,
	1035,1029,1024,1076,1070,1064,1058,1053,1047,1042,1035,1029,1024,1079,1074,1068,
	1063,1057,1051,1045,1040,1035,1030,1024,1083,1078,1072,1067,1061,1056,1050,1045,
	1039,1035,1029,1024,1087,1081,1075,1070,1064,1058,1052,1047,1041,1035,1029,1024,
	1092,1087,1081,1075,1069,1063,1058,1052,1046,1041,1035,1029,1024,1098,1093,1088,
	1083,1077,1072,1067,1061,1056,1051,1045,1040,1035,1029,1024,1105,1099,1093,1087,
	1082,1076,1070,1064,1058,1052,1046,1041,1035,1029,1024,1113,1107,1101,1095,1090,
	1084,1079,1073,1068,1062,1057,1051,1046,1040,1035,1029,1024,1123,1117,1111,1105,
	1099,1093,1087,1081,1076,1070,1064,1059,1053,1046,1041,1034,1029,1024,1135,1129,
	1124,1118,1112,1107,1101,1096,1089,1084,1078,1072,1067,1062,1056,1052,1046,1040,
	1035,1029,1024,1150,1144,1139,1134,1128,1122,1116,1110,1105,1099,1092,1087,1081,
	1076,1070,1064,1058,1053,1047,1041,1035,1029,1024,1170,1163,1158,1151,1145,1139,
	1133,1127,1122,1116,1110,1104,1099,1093,1086,1081,1075,1070,1064,1058,1053,1047,
	1041,1036,1029,1024,1196,1190,1185,1179,1174,1168,1162,1156,1151,1145,1138,1133,
	1127,1122,1117,1111,1105,1099,1093,1087,1082,1076,1071,1064,1059,1053,1047,1041,
	1036,1030,1024,1233,1227,1221,1215,1208,1201,1195,1189,1184,1178,1173,1167,1162,
	1156,1150,1145,1139,1133,1128,1122,1116,1111,1105,1099,1094,1087,1082,1076,1070,
	1064,1058,1052,1047,1041,1035,1029,1024,1291,1284,1278,1273,1267,1261,1255,1249,
	1244,1237,1232,1226,1220,1215,1209,1203,1197,1191,1186,1180,1174,1168,1162,1157,
	1151,1145,1139,1133,1127,1122,1116,1111,1105,1099,1093,1087,1081,1076,1070,1063,
	1058,1052,1047,1041,1035,1029,1024,1390,1385,1378,1373,1368,1363,1357,1352,1346,
	1340,1334,1329,1324,1318,1312,1307,1301,1295,1288,1283,1277,1271,1265,1259,1253,
	1247,1240,1234,1227,1221,1214,1208,1202,1195,1189,1183,1178,1172,1165,1158,1152,
	1146,1140,1134,1127,1121,1115,1109,1103,1097,1090,1085,1078,1072,1066,1060,1054,
	1048,1042,1036,1029,1024,1602,1595,1590,1582,1576,1569,1562,1556,1550,1543,1538,
	1532,1527,1522,1515,1510,1506,1500,1496,1489,1484,1477,1472,1467,1460,1454,1448,
	1442,1435,1430,1422,1416,1409,1404,1397,1391,1384,1377,1370,1364,1358,1351,1345,
	1338,1332,1325,1319,1313,1307,1301,1295,1289,1281,1275,1268,1262,1256,1249,1243,
	1237,1230,1224,1217,1211,1205,1198,1192,1185,1180,1173,1167,1161,1154,1148,1142,
	1137,1129,1123,1116,1111,1104,1098,1091,1085,1079,1073,1066,1060,1054,1048,1042,
	1035,1029,1024,2363,2341,2324,2302,2284,2264,2243,2225,2205,2185,2163,2146,2128,
	2106,2088,2068,2047,2029,2007,1989,1968,1948,1930,1910,1890,1870,1852,1832,1812,
	1793,1773,1753,1733,1713,1692,1674,1655,1634,1614,1596,1577,1559,1538,1519,1498,
	1480,1461,1440,1420,1400,1381,1361,1340,1322,1302,1282,1262,1244,1222,1203,1185,
	1165,1145,1123,1104,1084,1063,1043,1024,
};

u32 imx122_ae_sht_dgain[SHUTTER_DGAIN_TABLE_LENGTH]={
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,
	1044,1043,1034,1024,1024,1046,1038,1039,1030,1025,
	1024,1047,1042,1039,1031,1029,1024,1048,1048,1040,1031,1032,1024,1050,1050,1041,
	1034,1032,1024,1055,1050,1041,1040,1033,1024,1060,1051,1042,1042,1033,1026,1024,
	1053,1050,1046,1038,1039,1032,1024,1063,1053,1045,1043,1034,1028,1024,1056,1055,
	1048,1038,1039,1030,1024,1065,1056,1054,1048,1039,1040,1031,1024,1068,1059,1055,
	1050,1041,1041,1032,1024,1070,1060,1056,1051,1041,1042,1032,1024,1072,1062,1058,
	1052,1042,1043,1033,1025,1024,1066,1063,1058,1049,1050,1041,1034,1033,1024,1076,
	1069,1060,1060,1051,1044,1042,1032,1030,1024,1071,1072,1062,1055,1052,1042,1041,
	1033,1024,1024,1075,1071,1067,1057,1058,1049,1041,1041,1032,1029,1024,1079,1080,
	1071,1064,1063,1053,1053,1046,1037,1037,1028,1024,1089,1080,1079,1070,1061,1062,
	1052,1047,1042,1033,1032,1024,1089,1089,1079,1074,1070,1060,1060,1050,1042,1042,
	1032,1028,1024,1094,1094,1086,1077,1077,1068,1063,1059,1050,1050,1042,1032,1033,
	1024,1106,1103,1093,1093,1085,1076,1077,1067,1060,1059,1050,1047,1041,1032,1033,
	1024,1110,1111,1101,1096,1094,1085,1083,1077,1067,1068,1059,1050,1051,1041,1034,
	1033,1024,1125,1120,1110,1109,1101,1091,1091,1082,1074,1073,1063,1055,1054,1045,
	1040,1035,1026,1024,1135,1125,1127,1119,1110,1113,1091,1086,1085,1076,1076,1069,
	1061,1063,1055,1047,1048,1039,1037,1032,1024,1157,1147,1138,1138,1128,1122,1118,
	1109,1108,1099,1090,1090,1080,1073,1070,1061,1059,1052,1042,1042,1033,1024,1024,
	1165,1161,1157,1146,1147,1139,1129,1131,1121,1114,1113,1103,1101,1095,1085,1086,
	1077,1068,1069,1059,1053,1051,1041,1040,1033,1024,1204,1194,1185,1185,1175,1172,
	1165,1155,1156,1146,1137,1137,1127,1121,1118,1108,1107,1099,1089,1090,1080,1072,
	1071,1061,1057,1051,1042,1042,1033,1023,1024,1229,1223,1221,1211,1210,1203,1193,
	1195,1185,1176,1177,1168,1163,1159,1149,1150,1141,1132,1133,1123,1116,1115,1105,
	1102,1097,1087,1087,1078,1070,1071,1060,1054,1051,1042,1041,1033,1024,1298,1288,
	1280,1281,1270,1266,1261,1251,1251,1242,1231,1233,1222,1215,1214,1203,1201,1194,
	1183,1185,1176,1166,1166,1156,1152,1148,1137,1137,1128,1118,1118,1108,1102,1099,
	1089,1087,1080,1070,1071,1061,1053,1052,1042,1038,1033,1024,1398,1388,1377,1380,
	1368,1361,1359,1349,1348,1340,1329,1331,1321,1312,1313,1303,1297,1294,1283,1283,
	1275,1264,1266,1256,1248,1248,1237,1233,1229,1219,1219,1210,1200,1202,1192,1183,
	1183,1172,1169,1164,1154,1154,1145,1135,1137,1127,1119,1118,1108,1104,1099,1090,
	1089,1080,1071,1071,1062,1054,1053,1042,1036,1033,1024,1606,1600,1589,1591,1580,
	1568,1573,1560,1549,1552,1540,1533,1532,1520,1516,1513,1501,1501,1492,1483,1483,
	1474,1463,1465,1455,1445,1447,1437,1428,1428,1418,1411,1409,1398,1396,1389,1379,
	1379,1371,1359,1361,1350,1339,1341,1332,1320,1322,1312,1302,1303,1292,1284,1283,
	1272,1268,1264,1254,1251,1245,1234,1235,1226,1216,1218,1207,1197,1198,1189,1179,
	1179,1169,1159,1159,1149,1142,1139,1129,1125,1120,1109,1108,1100,1091,1091,1081,
	1072,1072,1062,1054,1052,1044,1037,1034,1024,2368,2348,2320,2313,2289,2263,2255,
	2227,2202,2194,2166,2145,2133,2107,2091,2070,2042,2038,2010,1983,1978,1949,1924,
	1915,1889,1867,1856,1829,1811,1795,1767,1755,1732,1710,1699,1672,1651,1640,1616,
	1592,1580,1555,1537,1520,1497,1477,1462,1438,1422,1401,1378,1364,1341,1317,1306,
	1281,1257,1247,1220,1199,1186,1162,1140,1125,1102,1083,1066,1043,1024,


};
u8 imx122_dlight[2] = {128,4};
